package org.smog.core.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import java.util.Date;

/**
 * 带long类型自增Id和创建,更新时间的实体基类
 *
 * @Description: Created by IntelliJ IDEA.
 * @project_name: smogTemp
 * @time: 2020-05-15 16:44
 * @email: 17685306043@163.com
 * @author: huangZhongYao
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class AbstractLongAutoIdAndTimeEntity extends AbstractLongAutoEntity {

    private static final long serialVersionUID = 1690087515147754217L;

    @TableField(
            value = "create_time",
            fill = FieldFill.INSERT, jdbcType = JdbcType.TIMESTAMP
    )
    private Date createTime;

    @TableField(
            value = "update_time",
            fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.TIMESTAMP
    )
    private Date updateTime;
}
